<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<style type="text/css">
	.weui-media-box_appmsg .weui-media-box__hd {
	width: 6rem;
	height: auto;
	margin-right: 8px;
	}
	.weui-media-box_appmsg .weui-media-box__thumb {
		vertical-align: middle;
	
	}
	.weui-media-box {
		padding: 0.8rem;
		margin-bottom: 10px;
		margin-left: 10px;
	}
	.weui-media-box__bd p{
		font-size: 0.6rem;
		color:#716f6f;
	}
	.cashbox {
		background-color: white;
		position: relative;
	}
	
	.cashbottom {
		position: absolute;
		top: 15px;
		right: 0px;
		padding: 0.2rem 0.5rem;
		background-color: #ff5B4b;
		background: #ff7225 none repeat scroll !important;
	}
</style>
	<c:if test="${empty insurances}">
		<div class="weui-panel_body" style="text-align: center;">
			<img alt="" src="<c:url value='/images/we/personCenter/null.png' />">
			<p style="margin: 5px 20px;color: #afafaf">更多产品陆续上架中...</p>
		</div>
	</c:if>
	<div>
	
	<c:forEach items="${insurances}" var="insurance">
	<a href="<c:url value='/wechat/insu/insuranceClassify/insuranceWechatDetail?insuranceId=${insurance.id}'/>" class="weui-media-box weui-media-box_appmsg everyInsu cashbox">	
      <div class="weui-media-box__bd">
        <h4 class="weui-media-box__title" style="width: 8rem">${insurance.insuranceName}</h4>
        <p class="weui-media-box__desc" style="width: 10rem;">${insurance.insuranceContent}</p>
        <c:if test="${insurance.channelName=='zhongan'}">				
					<p style="color: #1fa0db;font-size: 13px">(个人专享，暂不支持分佣)</p>
		</c:if>
      	<div class="weui-flex" style="margin-top: 0.2rem">
			<div class="weui-flex__item" style="flex-grow: 6; margin-top: 0.2rem">
				<span style="float: left; vertical-align: middle;font-size: 13px;color: #999"><span style=" color: #e1361a;font-size: 16px;font-weight: bold; ">￥${insurance.minPremium}</span>&nbsp;&nbsp;起</span>
				
			</div>
			<div class="weui-flex__item" style="flex-grow: 1; justify-content: center;">
				<img alt="" src="${tfn:getFileUrl(insurance.logoUrl)}" style="width: 3rem; vertical-align: middle;height: 0.8rem">
			</div>
		</div>
      </div>
      <c:if test="${customer.level=='maker'||customer.level=='highMaker'}">
      <div class="cashbottom" style="border-bottom-left-radius: 0.3rem;border-top-left-radius: 0.3rem">
		<span style="color: white; font-size: 0.6rem; float: left;" class="levelHide">
			奖励<fmt:formatNumber type="percent" minFractionDigits="0" value=" ${insurance.shareProportionOne} " />
				 + <fmt:formatNumber type="percent" minFractionDigits="0" value=" ${insurance.shareProportionOne/3-0.005} " /> 
		</span>
	  </div>
	  </c:if>
    </a>
	</c:forEach>
	
	
	
	
		<%-- <c:forEach items="${insurances}" var="insurance">
			<a href="<c:url value='/wechat/insu/insuranceClassify/insuranceWechatDetail?insuranceId=${insurance.id}'/>" class="weui-media-box weui-media-box_appmsg everyInsu">
				<div class="weui-media-box__hd panel-img">
					<img style="height: 4.5rem" class="weui-media-box__thumb" src="${tfn:getFileUrl(insurance.mainImg)}" alt="">
				</div>
				<div class="weui-media-box__bd">
					<h4 class="weui-media-box__title" style="font-size: 0.8rem">${insurance.insuranceName}</h4>
					<p class="weui-media-box__desc">${insurance.insuranceContent}</p>

					<div class="weui-flex ">
						<div class="weui-flex__item" style="flex-grow: 6;">
							<c:if test="${customer.level=='maker'||customer.level=='highMaker'}">
								<span style="color: #ff5b1d; font-size: 0.6rem" class="levelHide">
								分享奖  
								 <fmt:formatNumber type="percent" minFractionDigits="0" value=" ${insurance.shareProportionOne} " />
								 + <fmt:formatNumber type="percent" minFractionDigits="0" value=" ${insurance.shareProportionOne/3-0.005} " /> 
								</span>
							</c:if>
						</div>
						<div class="weui-flex__item"style="flex-grow: 1; justify-content: center; align-items: center;">

						</div>
					</div>
					<div class="weui-flex ">
						<div class="weui-flex__item" style="flex-grow: 6; margin-top: 0.2rem">
							<span style="float: left; vertical-align: middle; color: #ff5b1d; font-size: 0.6rem"><span>${insurance.minPremium}</span>元起</span>
						</div>
						<div class="weui-flex__item" style="flex-grow: 1; justify-content: center;">
							<img alt="" src="${tfn:getFileUrl(insurance.logoUrl)}" style="width: 3rem; vertical-align: middle;">
						</div>
					</div>
				</div>
			</a>
		</c:forEach> --%>
	</div>
<script type="text/javascript">
	Window.load=function(){
		console.log("列表页面加载完成");
	}
	$(function () {
		//判断是否为创客  隐藏 奖金内容
		${customer.level=='maker'||customer.level=='highMaker'}
		if($(".level").val()!="maker"&& $(".level").val()!="highMaker"){
			$(".levelHide").hide();
		}else{
		}
	})
</script>